package com.cros.pruebas;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;

public class Exceptions {
	
	public static void main(String argv[]){
		try{
		doStuff();
		System.out.println("despues ");
		}finally{
			System.out.println("finally de fynaliias");
		}
		System.out.println("exit main");
	}
	
	static void doStuff(){
		System.out.println("hek");
		try{
			System.out.println("catch");
		}catch(Exception es){
			es.printStackTrace();
		}finally{
			System.out.println("finalsl");
		}
		System.out.println("exit fynbaooi");
	}
	
	
	static void cahing (){
		try {
			
			RandomAccessFile raf =
					 new RandomAccessFile("myfile.txt", "r");
					byte b[] = new byte[1000];
					raf.readFully(b, 0, 1000);
					
		} catch (FileNotFoundException ex) {
		} catch (IOException e) {
			
		
			// handle just FileNotFoundException
			// do risky IO things
			
			// handle general IOExceptions
			
			}
	}

}
